Remove enabling of DeprecationWarning for anyone who imports the library#1127
Remove enabling of DeprecationWarning for anyone who imports the library#1127gideonred wants to merge 7 commits into
Conversation
Co-authored-by: Paolo Melchiorre <pmelchiorre@rippling.com>
Add blank line after imports before the warnings.filterwarnings call so isort (profile black) passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
scikit-learn 1.9 incorporates sample_weight into RandomForest's bootstrap resampling, so sample_weight=np.ones(...) is no longer numerically identical to sample_weight=None. Set bootstrap=False in the three classifier test_sample_weight tests to restore that invariant (uniform weights == no weights) while still exercising that real weights change predictions. test_fit_params pinned exact RandomForest CV scores that drift across sklearn versions; relax it to assert the deterministic subset structure and a tolerance band on the scores instead of exact floats. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thank you @gideonred for updating the PR along the lines we discussed on One more small thing would help @rasbt when he gets to this PR: could you add a brief line under Thanks again for the work here. |
# Conflicts: # docs/sources/CHANGELOG.md
|
@pauloxnet docs/sources/CHANGELOG.md updated, thanks! |
Description
At my current company someone imported this library.
Due to the library enabling all DeprecationWarnings on for all of code (including outside of this library), it causes a large increase in logs. Which impacts performance and cost of Observability tooling.
This PR disables that.
Pull Request Checklist
./docs/sources/CHANGELOG.mdfile (if applicable)./mlxtend/*/testsdirectories (if applicable)mlxtend/docs/sources/(if applicable)PYTHONPATH='.' pytest ./mlxtend -svand make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g.,PYTHONPATH='.' pytest ./mlxtend/classifier/tests/test_stacking_cv_classifier.py -sv)flake8 ./mlxtend